package com.example.Wisdompark.service;

import com.example.Wisdompark.dao.TransportOrderMapper;
import com.example.Wisdompark.pojo.Transport_Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public class TransportOrderImpl implements TransportOrderService {
    @Autowired
    private TransportOrderMapper transportOrderMapper;

    @Override
    public List<Transport_Order> queryAllOrder() {
        return transportOrderMapper.queryAllOrder();
    }

    @Override
    public int insertAOrder(Transport_Order transport_order) {
        return transportOrderMapper.insertAOrder(transport_order);
    }

    @Override
    public int updateOutOrder(String carNum, String order_num) {
        return transportOrderMapper.updateOutOrder(carNum,order_num);
    }

    @Override
    public int clearOutOrder() {
        return transportOrderMapper.clearOutOrder();
    }

    @Override
    public int updateLocation(String carNum, Float lng, Float lat) {
        return transportOrderMapper.updateLocation(carNum,lng,lat);
    }

    @Override
    public Transport_Order queryOrder(String carNum) {
        return transportOrderMapper.queryOrder(carNum);
    }

    @Override
    public List<Transport_Order> queryOrderByOrderNum() {
        return transportOrderMapper.queryOrderByOrderNum();
    }
}
